<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>display: inline-block</title>
    <style>
      * {
        padding: 0px;
        margin: 0px;
      }

      .box {
        width: 500px;
        height: 200px;
        font-size: 20px;
        color: white;
      }

      span {
        background-color: blue;
      }

      .box1 {
        background-color: chocolate;
      }

      .box2 {
        background-color: rgb(61, 43, 31);
      }

      .box2 span {
        display: inline-block;
        margin-bottom: 5px;
      }
    </style>
  </head>
  <body>
    <h1>inline-block：指定对象为内联块元素。</h1>
    <div class="box box1">
      <span>行内元素1</span>
      <span>行内元素2</span>
    </div>
    <div class="box box2">
      <span>行内元素1</span>
      <span>行内元素2</span>
      <span>行内元素3</span>
    </div>
  </body>
</html>
